<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Osmap: ORB_SLAM2::Osmap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Osmap
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">Osmap documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,'Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_o_r_b___s_l_a_m2_1_1_osmap.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_o_r_b___s_l_a_m2_1_1_osmap-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ORB_SLAM2::Osmap Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is a class for a singleton attached to ORB-SLAM2's map.  
 <a href="class_o_r_b___s_l_a_m2_1_1_osmap.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_osmap_8h_source.html">Osmap.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for ORB_SLAM2::Osmap:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_o_r_b___s_l_a_m2_1_1_osmap__coll__graph.svg" width="187" height="203"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad0c3627b8ca7468eb50dc38eb6ed2b14"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14">Options</a> { <br />
&#160;&#160;<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a792bd0166760f264fbc5e712ca761304">FEATURES_FILE_DELIMITED</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14aad2b1cf5a240398f9693b13a9c89d897">FEATURES_FILE_NOT_DELIMITED</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a63f91ef2f48c989bbf17dc1c77b6f4cb">NO_MAPPOINTS_FILE</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a1e1ea3481969f2bb342d92e6e5bacfd9">NO_KEYFRAMES_FILE</a>, 
<br />
&#160;&#160;<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14aa12ececbcc11af24abb2ce64eb1b9e11">NO_FEATURES_FILE</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a22c87295de75c5b37640e448d49cd310">NO_FEATURES_DESCRIPTORS</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a71f88906a07e590c7afff343772d5216">ONLY_MAPPOINTS_FEATURES</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a435cddba27465be7ce27a63bba406418">NO_LOOPS</a>, 
<br />
&#160;&#160;<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a738c75f214fad836ffad2865e70b52af">K_IN_KEYFRAME</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a8999f0e05e6d9d6abaadbfbec63d0655">NO_DEPURATION</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14aab9ddda14f4139f2da437830586c3fd9">NO_SET_BAD</a>, 
<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14a1f9502ef0ac4f2a262736f6ee5ce61db">NO_APPEND_FOUND_MAPPOINTS</a>, 
<br />
&#160;&#160;<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14ad1ba80ebae75fcc0d8e017113cd2069d">OPTIONS_SIZE</a>
<br />
 }<tr class="memdesc:ad0c3627b8ca7468eb50dc38eb6ed2b14"><td class="mdescLeft">&#160;</td><td class="mdescRight">All the options available.  <a href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ad0c3627b8ca7468eb50dc38eb6ed2b14"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a740f0e821f621fb499ba7dc9e84d8c50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a740f0e821f621fb499ba7dc9e84d8c50">clearVectors</a> ()</td></tr>
<tr class="memdesc:a740f0e821f621fb499ba7dc9e84d8c50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear temporary vectors.  <a href="#a740f0e821f621fb499ba7dc9e84d8c50">More...</a><br /></td></tr>
<tr class="separator:a740f0e821f621fb499ba7dc9e84d8c50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a767f3b961093f4d568c8bd4f6ad9a429"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a767f3b961093f4d568c8bd4f6ad9a429">countFeatures</a> ()</td></tr>
<tr class="memdesc:a767f3b961093f4d568c8bd4f6ad9a429"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count the number of features in vectorKeyFrames.  <a href="#a767f3b961093f4d568c8bd4f6ad9a429">More...</a><br /></td></tr>
<tr class="separator:a767f3b961093f4d568c8bd4f6ad9a429"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62b48a2dddc8128d7f1e56d4b25bd75d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a62b48a2dddc8128d7f1e56d4b25bd75d">depurate</a> ()</td></tr>
<tr class="memdesc:a62b48a2dddc8128d7f1e56d4b25bd75d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Irons keyframes and mappoints sets in map, before save.  <a href="#a62b48a2dddc8128d7f1e56d4b25bd75d">More...</a><br /></td></tr>
<tr class="separator:a62b48a2dddc8128d7f1e56d4b25bd75d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01427f9a1704802fc9d3b7b62b896bf4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a01427f9a1704802fc9d3b7b62b896bf4">deserialize</a> (const SerializedK &amp;, Mat &amp;k)</td></tr>
<tr class="memdesc:a01427f9a1704802fc9d3b7b62b896bf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstruct the intrinsic camera matrix K from protocol buffer message.  <a href="#a01427f9a1704802fc9d3b7b62b896bf4">More...</a><br /></td></tr>
<tr class="separator:a01427f9a1704802fc9d3b7b62b896bf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafd5b0821a01536b7be2edc238e2f3f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#aafd5b0821a01536b7be2edc238e2f3f4">deserialize</a> (const SerializedKArray &amp;serializedKArray, vector&lt; Mat *&gt; &amp;vK)</td></tr>
<tr class="memdesc:aafd5b0821a01536b7be2edc238e2f3f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstruct an array of camera calibration matrix K.  <a href="#aafd5b0821a01536b7be2edc238e2f3f4">More...</a><br /></td></tr>
<tr class="separator:aafd5b0821a01536b7be2edc238e2f3f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa45edd11320e01a5fb0ae4bb3357e28e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#aa45edd11320e01a5fb0ae4bb3357e28e">deserialize</a> (const SerializedDescriptor &amp;, Mat &amp;)</td></tr>
<tr class="memdesc:aa45edd11320e01a5fb0ae4bb3357e28e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstruct a descriptor, an 1x32 uchar Mat (256 bits).  <a href="#aa45edd11320e01a5fb0ae4bb3357e28e">More...</a><br /></td></tr>
<tr class="separator:aa45edd11320e01a5fb0ae4bb3357e28e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dd903c5116360b3a1b188b592ddda24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a6dd903c5116360b3a1b188b592ddda24">deserialize</a> (const SerializedPose &amp;, Mat &amp;)</td></tr>
<tr class="memdesc:a6dd903c5116360b3a1b188b592ddda24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstruct a 4x4 float Mat representing a pose in homogeneous coordinates.  <a href="#a6dd903c5116360b3a1b188b592ddda24">More...</a><br /></td></tr>
<tr class="separator:a6dd903c5116360b3a1b188b592ddda24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18cf886037877f8b32900f06c7099644"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a18cf886037877f8b32900f06c7099644">deserialize</a> (const SerializedPosition &amp;, Mat &amp;)</td></tr>
<tr class="memdesc:a18cf886037877f8b32900f06c7099644"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstructs 3D mappoint position in a 3x1 float Mat.  <a href="#a18cf886037877f8b32900f06c7099644">More...</a><br /></td></tr>
<tr class="separator:a18cf886037877f8b32900f06c7099644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3974e152e19aa6d0067072ef8f92c6c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a3974e152e19aa6d0067072ef8f92c6c1">deserialize</a> (const SerializedKeypoint &amp;, KeyPoint &amp;)</td></tr>
<tr class="memdesc:a3974e152e19aa6d0067072ef8f92c6c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstructs a KeyPoint.  <a href="#a3974e152e19aa6d0067072ef8f92c6c1">More...</a><br /></td></tr>
<tr class="separator:a3974e152e19aa6d0067072ef8f92c6c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36c922cc75024a993e1eafbf0e30542f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a36c922cc75024a993e1eafbf0e30542f">deserialize</a> (const SerializedMappoint &amp;serializedMappoint)</td></tr>
<tr class="memdesc:a36c922cc75024a993e1eafbf0e30542f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and fills a MapPoint from optional message fields.  <a href="#a36c922cc75024a993e1eafbf0e30542f">More...</a><br /></td></tr>
<tr class="separator:a36c922cc75024a993e1eafbf0e30542f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15638867e629a2a7bea605636b71627d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a15638867e629a2a7bea605636b71627d">deserialize</a> (const SerializedMappointArray &amp;, vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> *&gt; &amp;)</td></tr>
<tr class="memdesc:a15638867e629a2a7bea605636b71627d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves MapPoints from an array, and append them to the map.  <a href="#a15638867e629a2a7bea605636b71627d">More...</a><br /></td></tr>
<tr class="separator:a15638867e629a2a7bea605636b71627d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab6125bf56f3f57eb99060daf403fce0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#aab6125bf56f3f57eb99060daf403fce0">deserialize</a> (const SerializedKeyframe &amp;)</td></tr>
<tr class="memdesc:aab6125bf56f3f57eb99060daf403fce0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconstructs a KeyFrame from optional fields.  <a href="#aab6125bf56f3f57eb99060daf403fce0">More...</a><br /></td></tr>
<tr class="separator:aab6125bf56f3f57eb99060daf403fce0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31340e33fee5114d2784cef34ea7bf7c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a31340e33fee5114d2784cef34ea7bf7c">deserialize</a> (const SerializedKeyframeArray &amp;, vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&gt; &amp;)</td></tr>
<tr class="memdesc:a31340e33fee5114d2784cef34ea7bf7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves MapPoints from an array, and append them to the map.  <a href="#a31340e33fee5114d2784cef34ea7bf7c">More...</a><br /></td></tr>
<tr class="separator:a31340e33fee5114d2784cef34ea7bf7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b56308f638b71c0fb339b667eb70741"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a3b56308f638b71c0fb339b667eb70741">deserialize</a> (const SerializedKeyframeFeatures &amp;)</td></tr>
<tr class="memdesc:a3b56308f638b71c0fb339b667eb70741"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves all features belonging to one keyframe.  <a href="#a3b56308f638b71c0fb339b667eb70741">More...</a><br /></td></tr>
<tr class="separator:a3b56308f638b71c0fb339b667eb70741"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a315b84f707f206ef5dc40d8a872598c7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a315b84f707f206ef5dc40d8a872598c7">deserialize</a> (const SerializedKeyframeFeaturesArray &amp;)</td></tr>
<tr class="memdesc:a315b84f707f206ef5dc40d8a872598c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves all keyframe's features from the specified serialization object to vectorKeyframe.  <a href="#a315b84f707f206ef5dc40d8a872598c7">More...</a><br /></td></tr>
<tr class="separator:a315b84f707f206ef5dc40d8a872598c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a2320912c25b4866a50d76f99bd6cb8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a2a2320912c25b4866a50d76f99bd6cb8">featuresLoad</a> (string filename)</td></tr>
<tr class="memdesc:a2a2320912c25b4866a50d76f99bd6cb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the content of a "map.features" file and applies it to vectorKeyFrames.  <a href="#a2a2320912c25b4866a50d76f99bd6cb8">More...</a><br /></td></tr>
<tr class="separator:a2a2320912c25b4866a50d76f99bd6cb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a441308a8c45fe52261b83e4ef067a3b0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a441308a8c45fe52261b83e4ef067a3b0">featuresSave</a> (string filename)</td></tr>
<tr class="memdesc:a441308a8c45fe52261b83e4ef067a3b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save KeyFrane's features of vectorKeyFrames to file, usually "map.features".  <a href="#a441308a8c45fe52261b83e4ef067a3b0">More...</a><br /></td></tr>
<tr class="separator:a441308a8c45fe52261b83e4ef067a3b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad98ee55ee5858b41fcf5b46f7130ca60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad98ee55ee5858b41fcf5b46f7130ca60">getKeyFrame</a> (unsigned int id)</td></tr>
<tr class="memdesc:ad98ee55ee5858b41fcf5b46f7130ca60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks for a KeyFrame id in the map.  <a href="#ad98ee55ee5858b41fcf5b46f7130ca60">More...</a><br /></td></tr>
<tr class="separator:ad98ee55ee5858b41fcf5b46f7130ca60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a681220bad96871c89fdcca0d4af4bab3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a681220bad96871c89fdcca0d4af4bab3">getKeyFramesFromMap</a> ()</td></tr>
<tr class="memdesc:a681220bad96871c89fdcca0d4af4bab3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate vectorKeyFrames with MapPoints from Map.mspKeyFrames.  <a href="#a681220bad96871c89fdcca0d4af4bab3">More...</a><br /></td></tr>
<tr class="separator:a681220bad96871c89fdcca0d4af4bab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08e5538c8fc5d15dcea1ccf1a18ec239"><td class="memItemLeft" align="right" valign="top">MapPoint *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a08e5538c8fc5d15dcea1ccf1a18ec239">getMapPoint</a> (unsigned int id)</td></tr>
<tr class="memdesc:a08e5538c8fc5d15dcea1ccf1a18ec239"><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks for a mappoint by its id in the map.  <a href="#a08e5538c8fc5d15dcea1ccf1a18ec239">More...</a><br /></td></tr>
<tr class="separator:a08e5538c8fc5d15dcea1ccf1a18ec239"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa64b740f944510c89e3e4fce0b40cb7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#aa64b740f944510c89e3e4fce0b40cb7a">getMapPointsFromMap</a> ()</td></tr>
<tr class="memdesc:aa64b740f944510c89e3e4fce0b40cb7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate vectorMapPoints with MapPoints from Map.mspMapPoints.  <a href="#aa64b740f944510c89e3e4fce0b40cb7a">More...</a><br /></td></tr>
<tr class="separator:aa64b740f944510c89e3e4fce0b40cb7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6e421ce4d9725573268c5a42dd37cfe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ac6e421ce4d9725573268c5a42dd37cfe">getVectorKFromKeyframes</a> ()</td></tr>
<tr class="memdesc:ac6e421ce4d9725573268c5a42dd37cfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Traverse map's keyframes looking for different K matrices, and stores them into vectorK.  <a href="#ac6e421ce4d9725573268c5a42dd37cfe">More...</a><br /></td></tr>
<tr class="separator:ac6e421ce4d9725573268c5a42dd37cfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a775d14c122b56f057f28ac99eeb7c801"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a775d14c122b56f057f28ac99eeb7c801">KeyFramesLoad</a> (string filename)</td></tr>
<tr class="memdesc:a775d14c122b56f057f28ac99eeb7c801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the content of a "map.keyframes" file to vectorKeyFrames.  <a href="#a775d14c122b56f057f28ac99eeb7c801">More...</a><br /></td></tr>
<tr class="separator:a775d14c122b56f057f28ac99eeb7c801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac013a034151956fc5bf3f012b1776b59"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ac013a034151956fc5bf3f012b1776b59">KeyFramesSave</a> (string filename)</td></tr>
<tr class="memdesc:ac013a034151956fc5bf3f012b1776b59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the content of vectorKeyFrames to file like "map.keyframes".  <a href="#ac013a034151956fc5bf3f012b1776b59">More...</a><br /></td></tr>
<tr class="separator:ac013a034151956fc5bf3f012b1776b59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a1657f9a2da3a76f6fc1a3d08f6c8e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a0a1657f9a2da3a76f6fc1a3d08f6c8e8">log</a> ()</td></tr>
<tr class="separator:a0a1657f9a2da3a76f6fc1a3d08f6c8e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a667008047a8f3f35fa8e1ccb41e9f66f"><td class="memTemplParams" colspan="2">template&lt;typename Head , typename... Args&gt; </td></tr>
<tr class="memitem:a667008047a8f3f35fa8e1ccb41e9f66f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a667008047a8f3f35fa8e1ccb41e9f66f">log</a> (const Head &amp;head, const Args &amp;... args)</td></tr>
<tr class="separator:a667008047a8f3f35fa8e1ccb41e9f66f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af21baa698b40148a47df83ba2723f45c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#af21baa698b40148a47df83ba2723f45c">mapLoad</a> (string yamlFilename, bool noSetBad=false, bool pauseThreads=true)</td></tr>
<tr class="memdesc:af21baa698b40148a47df83ba2723f45c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the map from a set of files in the folder whose name is provided as an argument.  <a href="#af21baa698b40148a47df83ba2723f45c">More...</a><br /></td></tr>
<tr class="separator:af21baa698b40148a47df83ba2723f45c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fa48572bb8bcc90094c6cdb54344e22"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a8fa48572bb8bcc90094c6cdb54344e22">MapPointsLoad</a> (string filename)</td></tr>
<tr class="memdesc:a8fa48572bb8bcc90094c6cdb54344e22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the content of a "map.mappoints" file to vectorMapPoints.  <a href="#a8fa48572bb8bcc90094c6cdb54344e22">More...</a><br /></td></tr>
<tr class="separator:a8fa48572bb8bcc90094c6cdb54344e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac42c6046026a08ebe9ff60b266acc26f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ac42c6046026a08ebe9ff60b266acc26f">MapPointsSave</a> (string filename)</td></tr>
<tr class="memdesc:ac42c6046026a08ebe9ff60b266acc26f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the content of vectorMapPoints to file like "map.mappoints".  <a href="#ac42c6046026a08ebe9ff60b266acc26f">More...</a><br /></td></tr>
<tr class="separator:ac42c6046026a08ebe9ff60b266acc26f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32698cf5a21bbbbe915c4103f7969421"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a32698cf5a21bbbbe915c4103f7969421">mapSave</a> (string basefilename, bool pauseThreads=true)</td></tr>
<tr class="memdesc:a32698cf5a21bbbbe915c4103f7969421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the map to a set of files in the actual directory, with the extensionless name provided as the only argument and different extensions for each file.  <a href="#a32698cf5a21bbbbe915c4103f7969421">More...</a><br /></td></tr>
<tr class="separator:a32698cf5a21bbbbe915c4103f7969421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e8450a0dc32b38942b470dc7ca1cbdb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a9e8450a0dc32b38942b470dc7ca1cbdb">Osmap</a> (System &amp;_system)</td></tr>
<tr class="memdesc:a9e8450a0dc32b38942b470dc7ca1cbdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Only constructor, the only way to set the orb-slam2 map.  <a href="#a9e8450a0dc32b38942b470dc7ca1cbdb">More...</a><br /></td></tr>
<tr class="separator:a9e8450a0dc32b38942b470dc7ca1cbdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78b1896406be71fcc82acea1c395f54f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a78b1896406be71fcc82acea1c395f54f">parsePath</a> (const string &amp;path, string *filename=NULL, string *pathDirectory=NULL)</td></tr>
<tr class="memdesc:a78b1896406be71fcc82acea1c395f54f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility for separating path and filename from a full path.  <a href="#a78b1896406be71fcc82acea1c395f54f">More...</a><br /></td></tr>
<tr class="separator:a78b1896406be71fcc82acea1c395f54f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf1dc42d77938c5431ec197f1ab15fea"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#adf1dc42d77938c5431ec197f1ab15fea">readDelimitedFrom</a> (google::protobuf::io::ZeroCopyInputStream *rawInput, google::protobuf::MessageLite *message)</td></tr>
<tr class="memdesc:adf1dc42d77938c5431ec197f1ab15fea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a message to a vector file.  <a href="#adf1dc42d77938c5431ec197f1ab15fea">More...</a><br /></td></tr>
<tr class="separator:adf1dc42d77938c5431ec197f1ab15fea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2169ce8edf4eb86b329667b39f61eb0b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a2169ce8edf4eb86b329667b39f61eb0b">rebuild</a> (bool noSetBad=false)</td></tr>
<tr class="memdesc:a2169ce8edf4eb86b329667b39f61eb0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rebuilding takes place right after loading a map from files, before the map is copied to ORB-SLAM2' sets.  <a href="#a2169ce8edf4eb86b329667b39f61eb0b">More...</a><br /></td></tr>
<tr class="separator:a2169ce8edf4eb86b329667b39f61eb0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7e3d4086b5dfb826599865e246d810f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ac7e3d4086b5dfb826599865e246d810f">serialize</a> (const Mat &amp;k, SerializedK *serializedK)</td></tr>
<tr class="memdesc:ac7e3d4086b5dfb826599865e246d810f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize provided intrinsic camera matrix K to the protocol buffer message.  <a href="#ac7e3d4086b5dfb826599865e246d810f">More...</a><br /></td></tr>
<tr class="separator:ac7e3d4086b5dfb826599865e246d810f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22b5c14f2235b7cb83ba3344fdb87d3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a22b5c14f2235b7cb83ba3344fdb87d3b">serialize</a> (const vector&lt; Mat *&gt; &amp;vK, SerializedKArray &amp;serializedKArray)</td></tr>
<tr class="memdesc:a22b5c14f2235b7cb83ba3344fdb87d3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize an array of camera calibration matrix K.  <a href="#a22b5c14f2235b7cb83ba3344fdb87d3b">More...</a><br /></td></tr>
<tr class="separator:a22b5c14f2235b7cb83ba3344fdb87d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a282c0e8d92ec32d1beec6ea4cbcf9f03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a282c0e8d92ec32d1beec6ea4cbcf9f03">serialize</a> (const Mat &amp;, SerializedDescriptor *)</td></tr>
<tr class="memdesc:a282c0e8d92ec32d1beec6ea4cbcf9f03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes a descriptor, an 1x32 uchar Mat (256 bits).  <a href="#a282c0e8d92ec32d1beec6ea4cbcf9f03">More...</a><br /></td></tr>
<tr class="separator:a282c0e8d92ec32d1beec6ea4cbcf9f03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eb3d6298fa4ad81a24d10d402390cfd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a6eb3d6298fa4ad81a24d10d402390cfd">serialize</a> (const Mat &amp;, SerializedPose *)</td></tr>
<tr class="memdesc:a6eb3d6298fa4ad81a24d10d402390cfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize a 4x4 float Mat representing a pose in homogeneous coordinates.  <a href="#a6eb3d6298fa4ad81a24d10d402390cfd">More...</a><br /></td></tr>
<tr class="separator:a6eb3d6298fa4ad81a24d10d402390cfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28cb62fdb82e32aec35746b2f700de64"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a28cb62fdb82e32aec35746b2f700de64">serialize</a> (const Mat &amp;, SerializedPosition *)</td></tr>
<tr class="memdesc:a28cb62fdb82e32aec35746b2f700de64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize 3D mappoint position, a 3x1 float Mat.  <a href="#a28cb62fdb82e32aec35746b2f700de64">More...</a><br /></td></tr>
<tr class="separator:a28cb62fdb82e32aec35746b2f700de64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5eadc02965f8183caf0b1c4f9ef64d7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ab5eadc02965f8183caf0b1c4f9ef64d7">serialize</a> (const KeyPoint &amp;, SerializedKeypoint *)</td></tr>
<tr class="memdesc:ab5eadc02965f8183caf0b1c4f9ef64d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize 4 properties of a KeyPoint.  <a href="#ab5eadc02965f8183caf0b1c4f9ef64d7">More...</a><br /></td></tr>
<tr class="separator:ab5eadc02965f8183caf0b1c4f9ef64d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac77e91b7b88eb7569ee362d9e4505ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#aac77e91b7b88eb7569ee362d9e4505ae">serialize</a> (const <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> &amp;, SerializedMappoint *)</td></tr>
<tr class="memdesc:aac77e91b7b88eb7569ee362d9e4505ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes a MapPoint, according to options.  <a href="#aac77e91b7b88eb7569ee362d9e4505ae">More...</a><br /></td></tr>
<tr class="separator:aac77e91b7b88eb7569ee362d9e4505ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a260d0dff5bfb7911f66e3a3c7ffe5154"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a260d0dff5bfb7911f66e3a3c7ffe5154">serialize</a> (const vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> *&gt; &amp;, SerializedMappointArray &amp;)</td></tr>
<tr class="memdesc:a260d0dff5bfb7911f66e3a3c7ffe5154"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialized array of MapPoints.  <a href="#a260d0dff5bfb7911f66e3a3c7ffe5154">More...</a><br /></td></tr>
<tr class="separator:a260d0dff5bfb7911f66e3a3c7ffe5154"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73c3280cc3a7f37a87d452a6874ad557"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a73c3280cc3a7f37a87d452a6874ad557">serialize</a> (const <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> &amp;, SerializedKeyframe *)</td></tr>
<tr class="memdesc:a73c3280cc3a7f37a87d452a6874ad557"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize a KeyFrame.  <a href="#a73c3280cc3a7f37a87d452a6874ad557">More...</a><br /></td></tr>
<tr class="separator:a73c3280cc3a7f37a87d452a6874ad557"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a564b7a08ea182f730693382417e26ea5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a564b7a08ea182f730693382417e26ea5">serialize</a> (const vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&gt; &amp;, SerializedKeyframeArray &amp;)</td></tr>
<tr class="memdesc:a564b7a08ea182f730693382417e26ea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialized array of KeyFrames.  <a href="#a564b7a08ea182f730693382417e26ea5">More...</a><br /></td></tr>
<tr class="separator:a564b7a08ea182f730693382417e26ea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa0d1554657bc14d1de0970ee032d73b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#afa0d1554657bc14d1de0970ee032d73b">serialize</a> (const <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> &amp;, SerializedKeyframeFeatures *)</td></tr>
<tr class="memdesc:afa0d1554657bc14d1de0970ee032d73b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize all features observed by a KeyFrame.  <a href="#afa0d1554657bc14d1de0970ee032d73b">More...</a><br /></td></tr>
<tr class="separator:afa0d1554657bc14d1de0970ee032d73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b44ea8810b712d6a9eff432aae7b39e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a5b44ea8810b712d6a9eff432aae7b39e">serialize</a> (const vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&gt; &amp;vKF, SerializedKeyframeFeaturesArray &amp;serializedKeyframeFeaturesArray)</td></tr>
<tr class="memdesc:a5b44ea8810b712d6a9eff432aae7b39e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize all keyframe's features from provided keyframes container, to the specified serialization object.  <a href="#a5b44ea8810b712d6a9eff432aae7b39e">More...</a><br /></td></tr>
<tr class="separator:a5b44ea8810b712d6a9eff432aae7b39e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca4ae478929b8117bace36dd2c697bf2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#aca4ae478929b8117bace36dd2c697bf2">setKeyFramesToMap</a> ()</td></tr>
<tr class="memdesc:aca4ae478929b8117bace36dd2c697bf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate Map.mspKeyFrames with MapPoints from vectorKeyFrames.  <a href="#aca4ae478929b8117bace36dd2c697bf2">More...</a><br /></td></tr>
<tr class="separator:aca4ae478929b8117bace36dd2c697bf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13076431afb6af63ba33524b115ff734"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a13076431afb6af63ba33524b115ff734">setMapPointsToMap</a> ()</td></tr>
<tr class="memdesc:a13076431afb6af63ba33524b115ff734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populate Map.mspMapPoints with MapPoints from vectorMapPoints.  <a href="#a13076431afb6af63ba33524b115ff734">More...</a><br /></td></tr>
<tr class="separator:a13076431afb6af63ba33524b115ff734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89a68d613aeb23234b81c506156ae229"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a89a68d613aeb23234b81c506156ae229">writeDelimitedTo</a> (const google::protobuf::MessageLite &amp;message, google::protobuf::io::ZeroCopyOutputStream *rawOutput)</td></tr>
<tr class="memdesc:a89a68d613aeb23234b81c506156ae229"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a message to a vector file.  <a href="#a89a68d613aeb23234b81c506156ae229">More...</a><br /></td></tr>
<tr class="separator:a89a68d613aeb23234b81c506156ae229"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a99801213d8fe491882fce5fd7f5d5de1"><td class="memItemLeft" align="right" valign="top">Frame &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a99801213d8fe491882fce5fd7f5d5de1">currentFrame</a></td></tr>
<tr class="memdesc:a99801213d8fe491882fce5fd7f5d5de1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Any frame, to copy configuration values from.  <a href="#a99801213d8fe491882fce5fd7f5d5de1">More...</a><br /></td></tr>
<tr class="separator:a99801213d8fe491882fce5fd7f5d5de1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98e3356161b97db5aa4b853e2f44db60"><td class="memItemLeft" align="right" valign="top">KeyFrameDatabase &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a98e3356161b97db5aa4b853e2f44db60">keyFrameDatabase</a></td></tr>
<tr class="memdesc:a98e3356161b97db5aa4b853e2f44db60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Database of keyframes to be build after loading.  <a href="#a98e3356161b97db5aa4b853e2f44db60">More...</a><br /></td></tr>
<tr class="separator:a98e3356161b97db5aa4b853e2f44db60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75565bbc988cbe7d425b0fb48ae747b4"><td class="memItemLeft" align="right" valign="top">vector&lt; unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a75565bbc988cbe7d425b0fb48ae747b4">keyframeid2vectorkIdx</a></td></tr>
<tr class="memdesc:a75565bbc988cbe7d425b0fb48ae747b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">For each index KeyFrame.mnId the value returned is an index to vectorK.  <a href="#a75565bbc988cbe7d425b0fb48ae747b4">More...</a><br /></td></tr>
<tr class="separator:a75565bbc988cbe7d425b0fb48ae747b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af20d340d42dbbf52a27f402eaea94159"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map.html">OsmapMap</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#af20d340d42dbbf52a27f402eaea94159">map</a></td></tr>
<tr class="memdesc:af20d340d42dbbf52a27f402eaea94159"><td class="mdescLeft">&#160;</td><td class="mdescRight">ORB-SLAM2 map to be serialized.  <a href="#af20d340d42dbbf52a27f402eaea94159">More...</a><br /></td></tr>
<tr class="separator:af20d340d42dbbf52a27f402eaea94159"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a928cfe547ef3b6412c2187b0fe6158fd"><td class="memItemLeft" align="right" valign="top">bitset&lt; 32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a928cfe547ef3b6412c2187b0fe6158fd">options</a> = 0</td></tr>
<tr class="memdesc:a928cfe547ef3b6412c2187b0fe6158fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set of chosen options for serializing.  <a href="#a928cfe547ef3b6412c2187b0fe6158fd">More...</a><br /></td></tr>
<tr class="separator:a928cfe547ef3b6412c2187b0fe6158fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addf599a8a94d9ab35dd91d7f99506e5a"><td class="memItemLeft" align="right" valign="top">KeyFrame *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#addf599a8a94d9ab35dd91d7f99506e5a">pRefKF</a> = NULL</td></tr>
<tr class="memdesc:addf599a8a94d9ab35dd91d7f99506e5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This keyframe is a vehicle to MapPoint construction, which need a pRefKF as argument.  <a href="#addf599a8a94d9ab35dd91d7f99506e5a">More...</a><br /></td></tr>
<tr class="separator:addf599a8a94d9ab35dd91d7f99506e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade81b1dd7b95ce892811cd6e51d0a4ca"><td class="memItemLeft" align="right" valign="top">System &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ade81b1dd7b95ce892811cd6e51d0a4ca">system</a></td></tr>
<tr class="memdesc:ade81b1dd7b95ce892811cd6e51d0a4ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">System, needed to populate new keyframes after construction on deserialization, with some configuration values.  <a href="#ade81b1dd7b95ce892811cd6e51d0a4ca">More...</a><br /></td></tr>
<tr class="separator:ade81b1dd7b95ce892811cd6e51d0a4ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5331f247d8b7c5ed9c8d635c2856c182"><td class="memItemLeft" align="right" valign="top">vector&lt; Mat const * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a5331f247d8b7c5ed9c8d635c2856c182">vectorK</a></td></tr>
<tr class="memdesc:a5331f247d8b7c5ed9c8d635c2856c182"><td class="mdescLeft">&#160;</td><td class="mdescRight">Usually there is only one common matrix K for all KeyFrames in the entire map, there can be more, but there won't be as many K as KeyFrames.  <a href="#a5331f247d8b7c5ed9c8d635c2856c182">More...</a><br /></td></tr>
<tr class="separator:a5331f247d8b7c5ed9c8d635c2856c182"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63f25a3baf53d9a37db367363f0781f5"><td class="memItemLeft" align="right" valign="top">vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a63f25a3baf53d9a37db367363f0781f5">vectorKeyFrames</a></td></tr>
<tr class="memdesc:a63f25a3baf53d9a37db367363f0781f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Buffer where map's keyframes are stored in ascending id order, to save them to file in this order.  <a href="#a63f25a3baf53d9a37db367363f0781f5">More...</a><br /></td></tr>
<tr class="separator:a63f25a3baf53d9a37db367363f0781f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39c934d185750067f4eeb87bbe494bbb"><td class="memItemLeft" align="right" valign="top">vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a39c934d185750067f4eeb87bbe494bbb">vectorMapPoints</a></td></tr>
<tr class="memdesc:a39c934d185750067f4eeb87bbe494bbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Buffer where map's mappoints are stored in ascending id order, to save them to file in this order.  <a href="#a39c934d185750067f4eeb87bbe494bbb">More...</a><br /></td></tr>
<tr class="separator:a39c934d185750067f4eeb87bbe494bbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80aaa92fd4421ba2e557e3ebae258941"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a80aaa92fd4421ba2e557e3ebae258941">verbose</a> = false</td></tr>
<tr class="memdesc:a80aaa92fd4421ba2e557e3ebae258941"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether or not print on console info for debuging.  <a href="#a80aaa92fd4421ba2e557e3ebae258941">More...</a><br /></td></tr>
<tr class="separator:a80aaa92fd4421ba2e557e3ebae258941"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This is a class for a singleton attached to ORB-SLAM2's map. </p>
<p>Its constructor attaches it to the map. Its methods mapLoad and mapSave load and save a map.</p>
<p>A map is saved to a set of files in the actual folder, with a filename provided:</p><ul>
<li>filename.keyframes</li>
<li>filename.mappoints</li>
<li>filename.features</li>
<li>filename.yaml, the header</li>
</ul>
<p>The header is the only text file, in yaml format. Other files are in binary format. keyframes, mappoints and features files consist on a single protocol buffers 3 message. features file can also be an ad hoc delimited array of protocol buffers 3 messages.</p>
<p>Protocol buffers messages format can be found in osmap.proto file. Some of these objects has another object like KeyPoint, nested serialized with the appropiate serialize signature.</p>
<p>Methods:</p>
<ul>
<li>serialize(object, message): this method provides many signatures for many pairs {object, message},const where object, passed by reference, is the instance to be serialized (Mat, MapPoint, KeyFrame, etc.) and message is the protocol buffers destination object.</li>
<li>deserialize(message, object): this method provides many signatures for many pairs {object, message}, where message is the protocol buffers source object, and object (Mat, MapPoint, KeyFrame, etc.) is the actual destination. For MapPoint and KeyFrame, object can be either passed by reference or not provided at all, the method creates an empty one, and returns it deserialized.</li>
<li>messageArray is a message with only one field of repeated messages. messageArray serialized MapPoints, KeyFrames, Features...</li>
</ul>
<p>General rules:</p><ul>
<li>deserialize get a const message</li>
<li>serialize need a mutable message, it asks for a pointer to mutable message, as provided by protocol buferrs' mutable_field and add_field</li>
<li>serializeArray and deserializeArray serialize a messageArray, i.e. set of objects</li>
<li>unlike serialize, serializeArray uses a messageArray, not a pointer to it.</li>
</ul>
<p>Usage example:</p>
<p>In Orb-Slam2's main.cc, this code will save and load a map: </p><pre class="fragment">...
</pre><p> Construct the osmap object, can be right after SLAM construction. You only need one instance to load and save as many maps you want. <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">Osmap</a> osmap = <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">ORB_SLAM2::Osmap(SLAM)</a>; ... Whe you already has a map to save osmap.mapSave("myFirstMap"); // "myFirstMap" or "myFirstMap.yaml", same thing ... Now you want to load the map osmap.mapLoad("myFirstMap.yaml");</p>
<p>In Linux, zenity comes handy as dialog to get file name to load and save map. You need zenity installed, this runs the command line: </p><pre class="fragment">char cstringfilename[1024];
</pre><p>Load dialog FILE *f = popen("zenity --file-selection", "r"); fgets(cstringfilename, 1024, f);</p>
<p>Save dialog FILE *f = popen("zenity --file-selection --save --confirm-overwrite --filename=mapa", "r"); fgets(cstringfilename, 1024, f);</p>
<p>You probably want to go to localization only mode (tracking only, no mapping) right before saving or loading. To do that: </p><pre class="fragment">SLAM-&gt;ActivateLocalizationMode();
</pre><p>User also can control this with the button "Localization mode" in viewer. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="ad0c3627b8ca7468eb50dc38eb6ed2b14"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#ad0c3627b8ca7468eb50dc38eb6ed2b14">ORB_SLAM2::Osmap::Options</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>All the options available. </p>
<p>Options are persetted into options property. Default is zero. Options are activated with 1.</p>
<p>To test an option: </p><pre class="fragment">if(options[ORB_SLAM2::Osmap::ONLY_MAPPOINTS_FEATURES])...
</pre><p>To set an option: </p><pre class="fragment">options.set(ORB_SLAM2::Osmap::ONLY_MAPPOINTS_FEATURES);
</pre><p>Available options are documented in enum Options. New options can be added in the future, but the order of existing options must be keeped. So, new options must be added to the end of enum.</p>
<p>Time stamp is not optional because it always occupy place in protocol buffers, as all numeric fields. Defaults to 0.</p>
<p>Options are saved in the map file. NO_SET_BAD is the only option one can have insterest to set before loading, while not set in the file. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a792bd0166760f264fbc5e712ca761304"></a>FEATURES_FILE_DELIMITED&#160;</td><td class="fielddoc">
<p>Saves features file in delimited form: many protocol buffers messages in one file. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14aad2b1cf5a240398f9693b13a9c89d897"></a>FEATURES_FILE_NOT_DELIMITED&#160;</td><td class="fielddoc">
<p>Avoids saving features file in delimited form: only one protocol buffers message in the file, as always done with mappoints and keyframes. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a63f91ef2f48c989bbf17dc1c77b6f4cb"></a>NO_MAPPOINTS_FILE&#160;</td><td class="fielddoc">
<p>Skip saving mappoints file. Map will be incomplete, only for analysis porpouses. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a1e1ea3481969f2bb342d92e6e5bacfd9"></a>NO_KEYFRAMES_FILE&#160;</td><td class="fielddoc">
<p>Skip saving keyframes file. Map will be incomplete, only for analysis porpouses. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14aa12ececbcc11af24abb2ce64eb1b9e11"></a>NO_FEATURES_FILE&#160;</td><td class="fielddoc">
<p>Skip saving features file. Map will be incomplete, only for analysis porpouses. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a22c87295de75c5b37640e448d49cd310"></a>NO_FEATURES_DESCRIPTORS&#160;</td><td class="fielddoc">
<p>Skip saving descriptors in features file. Descriptors are saved only in mappoints. It is usually used with ONLY_MAPPOINTS_FEATURES to notable reduce features file size. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a71f88906a07e590c7afff343772d5216"></a>ONLY_MAPPOINTS_FEATURES&#160;</td><td class="fielddoc">
<p>Skip saving features that not belong to mappoints. This notable reduce features file size. Map will be fine for tracking, may get a little hard (not impossible) to continue mapping. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a435cddba27465be7ce27a63bba406418"></a>NO_LOOPS&#160;</td><td class="fielddoc">
<p>Skip saving and retrieving (loading) loops edges. Not expected size reduction. Map will work. For debug and analysis porpouses. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a738c75f214fad836ffad2865e70b52af"></a>K_IN_KEYFRAME&#160;</td><td class="fielddoc">
<p>Force saving K camera matrix on each keyframe instead of saving them on yaml file. Keyframes file will increase. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a8999f0e05e6d9d6abaadbfbec63d0655"></a>NO_DEPURATION&#160;</td><td class="fielddoc">
<p>Avoids map depuration process before save. Depuration get rid of bad elements, but could ruin the map if illformed. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14aab9ddda14f4139f2da437830586c3fd9"></a>NO_SET_BAD&#160;</td><td class="fielddoc">
<p>Avoids bad mappoints and keyframe detection while rebuilding the map, right after load. Used with dummy maps examples to prevent anomally detection, because dummy maps have incomplete class implementations. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14a1f9502ef0ac4f2a262736f6ee5ce61db"></a>NO_APPEND_FOUND_MAPPOINTS&#160;</td><td class="fielddoc">
<p>On depuration process before save, avoids adding to the map any found good mappoint erroneously deleted from map. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad0c3627b8ca7468eb50dc38eb6ed2b14ad1ba80ebae75fcc0d8e017113cd2069d"></a>OPTIONS_SIZE&#160;</td><td class="fielddoc">
<p>&lt; Number of options. Not an option. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a9e8450a0dc32b38942b470dc7ca1cbdb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ORB_SLAM2::Osmap::Osmap </td>
          <td>(</td>
          <td class="paramtype">System &amp;&#160;</td>
          <td class="paramname"><em>_system</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Only constructor, the only way to set the orb-slam2 map. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a740f0e821f621fb499ba7dc9e84d8c50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::clearVectors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear temporary vectors. </p>
<p>Only clears the vectors, not the objects its pointer elements pointed to (keyframes, mappoints, K matrices), because they belong to the map. </p>

</div>
</div>
<a id="a767f3b961093f4d568c8bd4f6ad9a429"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::countFeatures </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Count the number of features in vectorKeyFrames. </p>
<p>Invoked by mapSave to decide to use or not delimited form of feature file. </p>

</div>
</div>
<a id="a62b48a2dddc8128d7f1e56d4b25bd75d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::depurate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Irons keyframes and mappoints sets in map, before save. </p>
<p>Tests all keyframes in MapPoints.mObservations and mappoints in KeyFrames.mvpMapPoints, checking they are:</p>
<ul>
<li>not bad (!isBad())</li>
<li>in map (in Map::mspMapPoints and Map::mspKeyFrames)</li>
</ul>
<p>Those who not pass this check are eliminated, avoiding serialization of elements not belonging to the map.</p>
<p>This depuration affects (improves) the actual map in memory.</p>
<p>Invoked by mapSave. </p>

</div>
</div>
<a id="a01427f9a1704802fc9d3b7b62b896bf4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedK &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Mat &amp;&#160;</td>
          <td class="paramname"><em>k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstruct the intrinsic camera matrix K from protocol buffer message. </p>
<p>All 4 fields are required. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serializedK</td><td>Protocol buffers source message. </td></tr>
    <tr><td class="paramname">k</td><td>Destination to be reconstruted. K matrix, also known as calibration matrix, instrinsic matrix and camera matrix, 3x3 float Mat, usually from KeyFrame::mK. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aafd5b0821a01536b7be2edc238e2f3f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedKArray &amp;&#160;</td>
          <td class="paramname"><em>serializedKArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; Mat *&gt; &amp;&#160;</td>
          <td class="paramname"><em>vK</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstruct an array of camera calibration matrix K. </p>
<p>The array should be retrieved from keyframes analisys. Usually there is only one K common to all keyframes. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serializedKArray</td><td>The serialization destination object. </td></tr>
    <tr><td class="paramname">vK</td><td>The vector of K matrices to serialize. Usually <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a5331f247d8b7c5ed9c8d635c2856c182" title="Usually there is only one common matrix K for all KeyFrames in the entire map, there can be more...">Osmap::vectorK</a> member. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa45edd11320e01a5fb0ae4bb3357e28e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedDescriptor &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Mat &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstruct a descriptor, an 1x32 uchar Mat (256 bits). </p>
<p>Exactly 8 int required. </p>

</div>
</div>
<a id="a6dd903c5116360b3a1b188b592ddda24"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedPose &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Mat &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstruct a 4x4 float Mat representing a pose in homogeneous coordinates. </p>
<p>Exactly 12 float required. </p>

</div>
</div>
<a id="a18cf886037877f8b32900f06c7099644"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedPosition &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Mat &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstructs 3D mappoint position in a 3x1 float Mat. </p>
<p>All 3 fields required. </p>

</div>
</div>
<a id="a3974e152e19aa6d0067072ef8f92c6c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedKeypoint &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">KeyPoint &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstructs a KeyPoint. </p>
<p>All 4 fields required. </p>

</div>
</div>
<a id="a36c922cc75024a993e1eafbf0e30542f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a>* ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedMappoint &amp;&#160;</td>
          <td class="paramname"><em>serializedMappoint</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates and fills a MapPoint from optional message fields. </p>
<p>It doesn't perform MapPoint initialization. This should be done after deserialization. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serializedMappoint</td><td>Protocol buffers source message. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>*MapPoint A pointer to the newly created MapPoint, ready to be added to the map. </dd></dl>

</div>
</div>
<a id="a15638867e629a2a7bea605636b71627d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedMappointArray &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> *&gt; &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves MapPoints from an array, and append them to the map. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serializedMapPointArray</td><td>message to set up. Data goes to the output iterator. </td></tr>
    <tr><td class="paramname">output</td><td>iterator on the destination container. Usually std::inserter(mspMapPoints, mspMapPoints.end()). For vector it can be a Back inserter iterator where output is placed in arrival order. Usually mspMapPoints.begin(). About set back_inserter: <a href="https://stackoverflow.com/questions/908272/stdback-inserter-for-a-stdset">https://stackoverflow.com/questions/908272/stdback-inserter-for-a-stdset</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of MapPoints retrieved or -1 if error. Map's MapPoints set should be emptied before calling this method. </dd></dl>

</div>
</div>
<a id="aab6125bf56f3f57eb99060daf403fce0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a>* ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedKeyframe &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reconstructs a KeyFrame from optional fields. </p>
<p>It doesn't perform KeyFrame initialization. This should be done after deserialization. </p>

</div>
</div>
<a id="a31340e33fee5114d2784cef34ea7bf7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedKeyframeArray &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&gt; &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves MapPoints from an array, and append them to the map. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serializedMapPointArray</td><td>message to set up. Data goes from map. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of MapPoints retrieved or -1 if error. Map's MapPoints set should be emptied before calling this method. </dd></dl>

</div>
</div>
<a id="a3b56308f638b71c0fb339b667eb70741"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a>* ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedKeyframeFeatures &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves all features belonging to one keyframe. </p>
<p>First it takes the required keyframe_id field, and look in map for the keyframe with that id. Hence, keyframes must be already deserialized in map.</p>
<p>Puts all KeyPoints, MapPoints* and descriptors in their respective containters of the provided KeyFrame.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SerializedKeyframeFeatures</td><td>Object to be deserialized. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a315b84f707f206ef5dc40d8a872598c7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::deserialize </td>
          <td>(</td>
          <td class="paramtype">const SerializedKeyframeFeaturesArray &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves all keyframe's features from the specified serialization object to vectorKeyframe. </p>

</div>
</div>
<a id="a2a2320912c25b4866a50d76f99bd6cb8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::featuresLoad </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load the content of a "map.features" file and applies it to vectorKeyFrames. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>full name of the file to open. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a441308a8c45fe52261b83e4ef067a3b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::featuresSave </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save KeyFrane's features of vectorKeyFrames to file, usually "map.features". </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>full name of the file to be created and saved. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad98ee55ee5858b41fcf5b46f7130ca60"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a>* ORB_SLAM2::Osmap::getKeyFrame </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Looks for a KeyFrame id in the map. </p>
<p>Keyframes are usually stored in ascending id order. This function will be more probably called in the same way, so it is optimized for this expected behaviour. It uses itLastKF. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Id of the KeyFrame to look for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the KeyFrame with the given id, or NULL if not found. Used only in <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a3b56308f638b71c0fb339b667eb70741" title="Retrieves all features belonging to one keyframe. ">Osmap::deserialize(const SerializedKeyframeFeatures&amp;)</a>. </dd></dl>

</div>
</div>
<a id="a681220bad96871c89fdcca0d4af4bab3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::getKeyFramesFromMap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Populate vectorKeyFrames with MapPoints from Map.mspKeyFrames. </p>
<p>This is done as the first step to save keyframes. </p>

</div>
</div>
<a id="a08e5538c8fc5d15dcea1ccf1a18ec239"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MapPoint* ORB_SLAM2::Osmap::getMapPoint </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Looks for a mappoint by its id in the map. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Id of the MapPoint to look for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the MapPoint with the given id, or NULL if not found. </dd></dl>

</div>
</div>
<a id="aa64b740f944510c89e3e4fce0b40cb7a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::getMapPointsFromMap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Populate vectorMapPoints with MapPoints from Map.mspMapPoints. </p>
<p>This is done as the first step to save mappoints. </p>

</div>
</div>
<a id="ac6e421ce4d9725573268c5a42dd37cfe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::getVectorKFromKeyframes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Traverse map's keyframes looking for different K matrices, and stores them into vectorK. </p>
<p>It also populates keyframeid2vectork. </p>

</div>
</div>
<a id="a775d14c122b56f057f28ac99eeb7c801"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::KeyFramesLoad </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load the content of a "map.keyframes" file to vectorKeyFrames. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>full name of the file to open. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac013a034151956fc5bf3f012b1776b59"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::KeyFramesSave </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save the content of vectorKeyFrames to file like "map.keyframes". </p>
<p>Need </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>full name of the file to be created and saved. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of keyframes serialized. -1 if error.</dd></dl>
<p>This method ignores option NO_KEYFRAMES_FILE </p>

</div>
</div>
<a id="a0a1657f9a2da3a76f6fc1a3d08f6c8e8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::log </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a667008047a8f3f35fa8e1ccb41e9f66f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Head , typename... Args&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::log </td>
          <td>(</td>
          <td class="paramtype">const Head &amp;&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Args &amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="af21baa698b40148a47df83ba2723f45c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::mapLoad </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>yamlFilename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noSetBad</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>pauseThreads</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads the map from a set of files in the folder whose name is provided as an argument. </p>
<p>This is the entry point to load a map. This method uses the <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">Osmap</a> object to serialize the map to files.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">yamlFilename</td><td>file name of .yaml file (including .yaml extension) describing a map. </td></tr>
    <tr><td class="paramname">noSetBad</td><td>true to avoid bad mappoints and keyframes deletion on rebuilding after loading. </td></tr>
    <tr><td class="paramname">stopTrheads</td><td>Serializing needs some orb-slam2 threads to be paused. true (the default value) signals mapLoad to pause the threads before saving, and resume them after saving. false when threads are paused and resumed by other means.</td></tr>
  </table>
  </dd>
</dl>
<p>Only these properties are read from yaml:</p><ul>
<li>file nKeyframes</li>
<li>options</li>
<li>camera calibration matrices K</li>
<li>other files' names</li>
</ul>
<p>Before calling this method, threads must be paused. </p>

</div>
</div>
<a id="a8fa48572bb8bcc90094c6cdb54344e22"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::MapPointsLoad </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load the content of a "map.mappoints" file to vectorMapPoints. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>full name of the file to open. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac42c6046026a08ebe9ff60b266acc26f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::MapPointsSave </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save the content of vectorMapPoints to file like "map.mappoints". </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>full name of the file to be created and saved. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of mappoints serialized. -1 if error.</dd></dl>
<p>This method ignores option NO_MAPPOINTS_FILE If not K_IN_KEYFRAME option (the default), vectorK must be populated (see getVectorKFromKeyframes) prior invocation of this method. </p>

</div>
</div>
<a id="a32698cf5a21bbbbe915c4103f7969421"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::mapSave </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>basefilename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>pauseThreads</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Saves the map to a set of files in the actual directory, with the extensionless name provided as the only argument and different extensions for each file. </p>
<p>If filename has .yaml extension, mapSave will remove it to get the actual basefilename. Any existing file is rewritten without warning. This is the entry point to save a map. This method uses the <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">Osmap</a> object to serialize the map to files. Before calling this method:</p><ul>
<li>ORB-SLAM2 threads must be stopped to assure map is not being modify while saving.</li>
<li>Actual directory must be set to the desired destination. Often a new directory exclusive for the map is created.</li>
<li>options must be set.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">basefilename</td><td>File name without extenion or with .yaml extension. Many files will be created with this basefilename and different extensions. </td></tr>
    <tr><td class="paramname">pauseThreads</td><td>Serializing needs some orb-slam2 threads to be paused. true (the default value) signals mapSave to pause the threads before saving, and resume them after saving. false when threads are paused and resumed by other means.</td></tr>
  </table>
  </dd>
</dl>
<p>MapSave copy map's mappoints and keyframes sets to vectorMapPoints and vectorKeyFrames and sort them, to save objects in ascending id order. MapLoad doesn't use those vector.</p>
<p>If features number exceed an arbitrary maximum, in order to avoid size related protocol buffer problems, mapSave limit the size of protocol buffer's messages saving features file in delimited form, using Kendon Varda writeDelimitedTo function. </p>

</div>
</div>
<a id="a78b1896406be71fcc82acea1c395f54f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::parsePath </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string *&#160;</td>
          <td class="paramname"><em>filename</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string *&#160;</td>
          <td class="paramname"><em>pathDirectory</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Utility for separating path and filename from a full path. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Output string, filename found in path, '' if no file in the path. Can be NULL. </td></tr>
    <tr><td class="paramname">pathDirectory</td><td>Output string with the directory's path, '' if none. Can be NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adf1dc42d77938c5431ec197f1ab15fea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ORB_SLAM2::Osmap::readDelimitedFrom </td>
          <td>(</td>
          <td class="paramtype">google::protobuf::io::ZeroCopyInputStream *&#160;</td>
          <td class="paramname"><em>rawInput</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">google::protobuf::MessageLite *&#160;</td>
          <td class="paramname"><em>message</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads a message to a vector file. </p>
<p>A vector file is an array of messages. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td></td></tr>
    <tr><td class="paramname">rawOutput</td><td>input stream, readable source file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if ok, false if error.</dd></dl>
<p>Kendon Varda code to serialize many messages in one file, from <a href="https://stackoverflow.com/questions/2340730/are-there-c-equivalents-for-the-protocol-buffers-delimited-i-o-functions-in-ja">https://stackoverflow.com/questions/2340730/are-there-c-equivalents-for-the-protocol-buffers-delimited-i-o-functions-in-ja</a> </p>

</div>
</div>
<a id="a2169ce8edf4eb86b329667b39f61eb0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::rebuild </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noSetBad</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rebuilding takes place right after loading a map from files, before the map is copied to ORB-SLAM2' sets. </p>
<p>Works on <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a39c934d185750067f4eeb87bbe494bbb" title="Buffer where map&#39;s mappoints are stored in ascending id order, to save them to file in this order...">Osmap::vectorMapPoints</a> and <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a63f25a3baf53d9a37db367363f0781f5" title="Buffer where map&#39;s keyframes are stored in ascending id order, to save them to file in this order...">Osmap::vectorKeyFrames</a>. After rebuilding, the elements in these vector should be copied to the map sets.</p>
<p><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a2169ce8edf4eb86b329667b39f61eb0b" title="Rebuilding takes place right after loading a map from files, before the map is copied to ORB-SLAM2&#39; s...">rebuild()</a> needs KeyPoints and MapPoints to be initialized with a lot of properties set, as the default constructors for <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html" title="Wrapped KeyFrame to let Osmap access protected properties without modifying KeyFrame code...">OsmapKeyFrame</a> and <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html" title="Wrapped MapPoint to let Osmap access protected properties without modifying MapPoint code...">OsmapMapPoint</a> show.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">noSetBad</td><td>true to avoid bad mappoints and keyframes deletion on rebuilding.</td></tr>
  </table>
  </dd>
</dl>
<p>This method checks <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html#a80aaa92fd4421ba2e557e3ebae258941" title="Whether or not print on console info for debuging. ">Osmap::verbose</a> property to produce console output for debugging purposes.</p>
<p>How rebuild works:</p>
<ul>
<li>Loops on every keyframe:<ul>
<li>ComputeBOW, building BOW vectors from descriptors</li>
<li>Builds many pose matrices from pose</li>
<li>Builds the grid</li>
<li>Adds to KeyFrameDatabase</li>
<li>Builds its mappoints observations</li>
<li>UpdateConnections, building the spaning tree and the covisibility graph</li>
</ul>
</li>
<li>Sets KeyFrame::nNextId</li>
<li>Retries UpdateConnections on isolated keyframes.</li>
<li>Sets bad keyframes remaining isolated (avoided with noSetBad argument true)</li>
<li>Sets map.mvpKeyFrameOrigins</li>
<li>Travels keyframes looking for orphans, trying to assign a parent, thus including them in the spanning tree.</li>
<li>Loops on every mappoint:<ul>
<li>Sets bad mappoints without observations (avoided with noSetBad argument true)</li>
<li>Sets mpRefKF</li>
<li>UpdateNormalAndDepth, setting mNormalVector, mfMinDistance, mfMaxDistance</li>
</ul>
</li>
<li>Sets MapPoint::nNextId </li>
</ul>

</div>
</div>
<a id="ac7e3d4086b5dfb826599865e246d810f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const Mat &amp;&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedK *&#160;</td>
          <td class="paramname"><em>serializedK</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize provided intrinsic camera matrix K to the protocol buffer message. </p>
<p>All 4 fields required. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Source to be serialized. K matrix, also known as calibration matrix, instrinsic matrix and camera matrix, 3x3 float Mat, usually from KeyFrame::mK. </td></tr>
    <tr><td class="paramname">serializedK</td><td>Protocol buffers destination message to be serialized. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a22b5c14f2235b7cb83ba3344fdb87d3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; Mat *&gt; &amp;&#160;</td>
          <td class="paramname"><em>vK</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedKArray &amp;&#160;</td>
          <td class="paramname"><em>serializedKArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize an array of camera calibration matrix K. </p>
<p>The array should be retrieved from keyframes analisys. Usually there is only one K common to all keyframes. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vK</td><td>The vector of K matrices to serialize. </td></tr>
    <tr><td class="paramname">serializedKArray</td><td>The serialization destination object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a282c0e8d92ec32d1beec6ea4cbcf9f03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const Mat &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedDescriptor *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serializes a descriptor, an 1x32 uchar Mat (256 bits). </p>
<p>Protocol Buffers doesn't have a Byte type, so it's serialized to 8 int. Exactly 8 int required. </p>

</div>
</div>
<a id="a6eb3d6298fa4ad81a24d10d402390cfd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const Mat &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedPose *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize a 4x4 float Mat representing a pose in homogeneous coordinates. </p>
<p>Exactly 12 float required. </p>

</div>
</div>
<a id="a28cb62fdb82e32aec35746b2f700de64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const Mat &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedPosition *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize 3D mappoint position, a 3x1 float Mat. </p>
<p>All 3 fields required. </p>

</div>
</div>
<a id="ab5eadc02965f8183caf0b1c4f9ef64d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const KeyPoint &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedKeypoint *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize 4 properties of a KeyPoint. </p>
<p>All 4 fields required. </p>

</div>
</div>
<a id="aac77e91b7b88eb7569ee362d9e4505ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedMappoint *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serializes a MapPoint, according to options. </p>

</div>
</div>
<a id="a260d0dff5bfb7911f66e3a3c7ffe5154"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a> *&gt; &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedMappointArray &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialized array of MapPoints. </p>
<p>The serialized message can be saved to an exclusive file, or be appended to a multiobject file. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">start</td><td>Inclusive begining of the range of MapPoints to be serialized. Usually map.mspMapPoints.begin(). </td></tr>
    <tr><td class="paramname">end</td><td>Exclusive end of the range of MapPoints to be serialized. Usually map.mspMapPoints.end(). </td></tr>
    <tr><td class="paramname">serializedMapPointArray</td><td>message to set up. Data comes from the range iterated. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of MapPoints serialized or -1 if error. The number of MapPoints serialized should be the same number of MapPoints in the map. </dd></dl>

</div>
</div>
<a id="a73c3280cc3a7f37a87d452a6874ad557"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedKeyframe *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize a KeyFrame. </p>
<p>Serialization and deserialization assume KeyFrames are processed in ascending id order. </p>

</div>
</div>
<a id="a564b7a08ea182f730693382417e26ea5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&gt; &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedKeyframeArray &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialized array of KeyFrames. </p>
<p>This can make a file, or be appended to a multiobject file. KeyFrames will be serialized in ascending id order. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serializedKeyFrameArray</td><td>message to set up. Data comes from map. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of KeyFrames serialized or -1 if error. The number of KeyFrames serialized should be the same number of MapPoints in the map. </dd></dl>

</div>
</div>
<a id="afa0d1554657bc14d1de0970ee032d73b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedKeyframeFeatures *&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize all features observed by a KeyFrame. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pKF</td><td>KeyFrame owner of the feature. The features will be stored in this KeyFrame containers. </td></tr>
    <tr><td class="paramname">SerializedKeyframeFeatures</td><td>Message destination of serialization. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The serialized message object. </dd></dl>

</div>
</div>
<a id="a5b44ea8810b712d6a9eff432aae7b39e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ORB_SLAM2::Osmap::serialize </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a> *&gt; &amp;&#160;</td>
          <td class="paramname"><em>vKF</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SerializedKeyframeFeaturesArray &amp;&#160;</td>
          <td class="paramname"><em>serializedKeyframeFeaturesArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serialize all keyframe's features from provided keyframes container, to the specified serialization object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vKF</td><td>vector of KeyFrames to save, usually vectorKeyFrames member order by mnId. </td></tr>
    <tr><td class="paramname">serializedKeyframeFeaturesArray</td><td>output serialization object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aca4ae478929b8117bace36dd2c697bf2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::setKeyFramesToMap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Populate Map.mspKeyFrames with MapPoints from vectorKeyFrames. </p>
<p>This is done after loading keyframes. </p>

</div>
</div>
<a id="a13076431afb6af63ba33524b115ff734"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ORB_SLAM2::Osmap::setMapPointsToMap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Populate Map.mspMapPoints with MapPoints from vectorMapPoints. </p>
<p>This is done after loading mappoints. </p>

</div>
</div>
<a id="a89a68d613aeb23234b81c506156ae229"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ORB_SLAM2::Osmap::writeDelimitedTo </td>
          <td>(</td>
          <td class="paramtype">const google::protobuf::MessageLite &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">google::protobuf::io::ZeroCopyOutputStream *&#160;</td>
          <td class="paramname"><em>rawOutput</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes a message to a vector file. </p>
<p>A vector file is an array of messages. In order to possibilitate deserialization, the message size is prepended to the message. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td></td></tr>
    <tr><td class="paramname">rawOutput</td><td>output stream, writable destination file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if ok, false if error.</dd></dl>
<p>Kendon Varda code to serialize many messages in one file, from <a href="https://stackoverflow.com/questions/2340730/are-there-c-equivalents-for-the-protocol-buffers-delimited-i-o-functions-in-ja">https://stackoverflow.com/questions/2340730/are-there-c-equivalents-for-the-protocol-buffers-delimited-i-o-functions-in-ja</a></p>
<p>When writing to a file, *rawOutput object must be deleted before closing the file, to ensure flushing. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a99801213d8fe491882fce5fd7f5d5de1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Frame&amp; ORB_SLAM2::Osmap::currentFrame</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Any frame, to copy configuration values from. </p>
<p>Constructor takes currentFrame from Tracker. </p>

</div>
</div>
<a id="a98e3356161b97db5aa4b853e2f44db60"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KeyFrameDatabase&amp; ORB_SLAM2::Osmap::keyFrameDatabase</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Database of keyframes to be build after loading. </p>

</div>
</div>
<a id="a75565bbc988cbe7d425b0fb48ae747b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;unsigned int&gt; ORB_SLAM2::Osmap::keyframeid2vectorkIdx</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>For each index KeyFrame.mnId the value returned is an index to vectorK. </p>
<p>The later is the index saved in each keyframe as k. It is populated only by getVectorKFromKeyframes, and consumed only while saving the map, during keyframe serialization. </p>

</div>
</div>
<a id="af20d340d42dbbf52a27f402eaea94159"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map.html">OsmapMap</a>&amp; ORB_SLAM2::Osmap::map</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ORB-SLAM2 map to be serialized. </p>

</div>
</div>
<a id="a928cfe547ef3b6412c2187b0fe6158fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bitset&lt;32&gt; ORB_SLAM2::Osmap::options = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set of chosen options for serializing. </p>
<p>User must set options prior to saving a map. Loading a map should reflect in this property the saved map options. </p>

</div>
</div>
<a id="addf599a8a94d9ab35dd91d7f99506e5a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KeyFrame* ORB_SLAM2::Osmap::pRefKF = NULL</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This keyframe is a vehicle to MapPoint construction, which need a pRefKF as argument. </p>
<p>MapPoint construction occurs only while loading. pRefKF can be any KeyFrame. mapLoad can be invoked when there is no map in orbslam2, which means there is no keyframe in it. So <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">Osmap</a> constructs one. But constructed a KeyFrame requires a populated Frame (<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">Osmap</a> uses tracker.currentFrame), and it isn't populated with data before first tracking loop. This means pRefKF can't be constructed in <a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html" title="This is a class for a singleton attached to ORB-SLAM2&#39;s map. ">Osmap</a> constructor. pRefKF keyframe is constructed on the first map load, more specifically right before mappoints are loaded. </p>

</div>
</div>
<a id="ade81b1dd7b95ce892811cd6e51d0a4ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">System&amp; ORB_SLAM2::Osmap::system</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>System, needed to populate new keyframes after construction on deserialization, with some configuration values. </p>

</div>
</div>
<a id="a5331f247d8b7c5ed9c8d635c2856c182"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;Mat const *&gt; ORB_SLAM2::Osmap::vectorK</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Usually there is only one common matrix K for all KeyFrames in the entire map, there can be more, but there won't be as many K as KeyFrames. </p>
<p>This vector temporarily store different K for serialization and deserialization. This avoids serializing one K per KeyFrame. This vector is consumed in keyframe deserialization. </p>

</div>
</div>
<a id="a63f25a3baf53d9a37db367363f0781f5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_key_frame.html">OsmapKeyFrame</a>*&gt; ORB_SLAM2::Osmap::vectorKeyFrames</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Buffer where map's keyframes are stored in ascending id order, to save them to file in this order. </p>
<p>This vector is set in mapSave, and it's left ontouched for user interest. </p>

</div>
</div>
<a id="a39c934d185750067f4eeb87bbe494bbb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;<a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap_map_point.html">OsmapMapPoint</a>*&gt; ORB_SLAM2::Osmap::vectorMapPoints</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Buffer where map's mappoints are stored in ascending id order, to save them to file in this order. </p>
<p>This vector is set in mapSave, and it's left ontouched for user interest. This vector is consumed in serialize </p>

</div>
</div>
<a id="a80aaa92fd4421ba2e557e3ebae258941"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ORB_SLAM2::Osmap::verbose = false</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Whether or not print on console info for debuging. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/alejandro/Development/osmap/include/<a class="el" href="_osmap_8h_source.html">Osmap.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_o_r_b___s_l_a_m2.html">ORB_SLAM2</a></li><li class="navelem"><a class="el" href="class_o_r_b___s_l_a_m2_1_1_osmap.html">Osmap</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
